package com.ruoyi.student.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.student.mapper.StudentsDormsMapper;
import com.ruoyi.student.domain.StudentsDorms;
import com.ruoyi.student.service.IStudentsDormsService;

/**
 * 寝室信息Service业务层处理
 *
 *
 * @date 2024-04-16
 */
@Service
public class StudentsDormsServiceImpl implements IStudentsDormsService
{
    @Autowired
    private StudentsDormsMapper studentsDormsMapper;

    /**
     * 查询寝室信息
     *
     * @param dormsId 寝室信息主键
     * @return 寝室信息
     */
    @Override
    public StudentsDorms selectStudentsDormsByDormsId(String dormsId)
    {
        return studentsDormsMapper.selectStudentsDormsByDormsId(dormsId);
    }

    /**
     * 查询寝室信息列表
     *
     * @param studentsDorms 寝室信息
     * @return 寝室信息
     */
    @Override
    public List<StudentsDorms> selectStudentsDormsList(StudentsDorms studentsDorms)
    {
        return studentsDormsMapper.selectStudentsDormsList(studentsDorms);
    }

    /**
     * 新增寝室信息
     *
     * @param studentsDorms 寝室信息
     * @return 结果
     */
    @Override
    public int insertStudentsDorms(StudentsDorms studentsDorms)
    {
        return studentsDormsMapper.insertStudentsDorms(studentsDorms);
    }

    /**
     * 修改寝室信息
     *
     * @param studentsDorms 寝室信息
     * @return 结果
     */
    @Override
    public int updateStudentsDorms(StudentsDorms studentsDorms)
    {
        return studentsDormsMapper.updateStudentsDorms(studentsDorms);
    }

    /**
     * 批量删除寝室信息
     *
     * @param dormsIds 需要删除的寝室信息主键
     * @return 结果
     */
    @Override
    public int deleteStudentsDormsByDormsIds(String[] dormsIds)
    {
        return studentsDormsMapper.deleteStudentsDormsByDormsIds(dormsIds);
    }

    /**
     * 删除寝室信息信息
     *
     * @param dormsId 寝室信息主键
     * @return 结果
     */
    @Override
    public int deleteStudentsDormsByDormsId(String dormsId)
    {
        return studentsDormsMapper.deleteStudentsDormsByDormsId(dormsId);
    }
}
